import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

import * as path from "path"
import electron from "vite-plugin-electron/simple";


// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    electron({
      main: {
        entry: 'electron-main/main.ts',
        vite: { build: { outDir: "dist/electron", } }
      },
      preload: {
        input: path.join(__dirname, './electron-preload/preload.ts'),
        vite: { build: { outDir: "dist/electron", } }
      }

    }),

  ],
  build: {
    emptyOutDir: false
  }
})
